use serde_json::Value;
use crate::extends::utils::json_util::JsonUtil;
use crate::extends::utils::request_util::RequestUtil;

#[derive(Debug)]
pub struct OpenAiRemoteManager;

impl OpenAiRemoteManager {
    pub async fn health() -> Value {
        let resutl = match RequestUtil::get("http://127.0.0.1:8000/health", None, None).await {
            Ok(v) => { v }
            Err(_) => { "{}".to_string() }
        };
        JsonUtil::parse(&resutl).unwrap()
    }
}